<template>
	<view class="page_box">
		<u-navbar :is-back="true" title="邀请的好友" v-if="1" :border-bottom="false"></u-navbar>

		<view class="content_box  ">
			<!-- <scroll-view scroll-y="true" style="height: 80vh;"> -->
				<z-paging
					ref="paging"
					v-model="dataList"
					@query="name"
					:default-page-size="10"
					loading-more-no-more-text="我也是有底线的！"
					use-page-scroll
					:show-refresher-update-time="true"
					:refresher-update-time-key="5"
				>
					<custom-refresher slot="refresher" slot-scope="{ refresherStatus }" :status="refresherStatus"></custom-refresher>
					<view class="padding">
						<block v-for="(item, index) in dataList" :key="index">
							<view class="margin-bottom-sm flex align-center " @click="l.previewImage([item.avatar])">
								<image :src="item.avatar" mode="aspectFill" class="w70 h70 round bg-gray"></image>
								<view class="solid-bottom flex justify-between f-1  align-center ml28 padding-tb-sm">
									<view class="flex align-center">
										<text class="f28 text-black text-bold">{{ item.nickname }}</text>
										<text class="f28 text-black cu-tag bg-orange light round sm margin-left" v-if="item.member_type">
											{{ item.member_type }}
										</text>
									</view>
									<text class="ff24 text-gray">{{ item.create_time }}</text>
								</view>
							</view>
						</block>
					</view>
				</z-paging>
				
			<!-- </scroll-view> -->
		</view>
		<yy-login v-if="vuex_login"></yy-login>
		<!-- 加载提示 -->
		<yy-loading text="加载中.." mask="true" click="true" ref="loading"></yy-loading>
		<!-- 信息提示-->
		<u-toast ref="uToast" />
	</view>
</template>

<script>
export default {
	data() {
		return {
			dataList: [],
			empty: false,
		};
	},
	onShow() {},
	onLoad(e) {},
	methods: {
		// async name() {
		//     let obj = {
		//         page: this.page,
		//         page_size: this.page_size,
		//     };
		//     const res = await this.$u.post('UserInfo/inviteList', obj, {});
		//     this.data = res.data.list;
		//     this.data.length == 0 && (this.empty = true);
		//     console.log('res :>> ', res.data.list);
		// },
		async name(pageNo, pageSize) {
			let obj = {
				page: pageNo,
				page_size: pageSize,
			};
			const res = await this.$u.post('UserInfo/inviteList', obj, {});
			if (res.code) {
				this.$refs.paging.complete(res.data.list);
			}
		},
	},
};
</script>

<style lang="scss" scoped>
.page_box {
	.head_box {
	}
	.content_box {
	}
}
</style>
